<?php include('checkuser.php') ?>
<?php
if( isset($_GET['requester']) ) {
	$req = $_GET['requester'];
} else {
	$req = $profile['USERNAME'];
}
?>
<h1>Profile Details</h1>
<div id="container">

<div id="work">
<img border="0" src="img/<?php echo $profile["USERNAME"]; ?>.jpg" alt="Pic" width="304" height="228" class="pic"><br><br><br>

<div id="table">
<table>
	<tr>
	<td>First Name</td>
	<td><?php echo $profile["FIRST_NAME"]; ?></td>
	</tr>
	<tr>
	<td>Last Name</td>
	<td><?php echo $profile["LAST_NAME"]; ?></td>
	</tr>
	<tr>
	<td>Gender</td>
	<td><?php 
		if($profile["GENDER"] == "M") {
			echo "Male";
		} else {
			echo "Female";
		}
		?></td>
	</tr>
	<tr>
	<td>Date of Birth</td>
	<td><?php echo $profile["DOB"]; ?></td>
	<tr>
	<td>Email</td>
	<td><a href="mailto:<?php echo $profile["EMAIL"]; ?>"><?php echo $profile["EMAIL"]; ?></a></td>
	</tr>
	<tr>
	<td>Telephone</td>
	<td><?php echo $profile["PHONE"]; ?></td>
	</tr>
	<tr>
	<td>Favourite Food</td>
	<td><?php echo $profile["FOOD"]; ?></td>
	</tr>
	<tr>
	<td>Relationship Status</td>
	<td><?php 
		if($profile["RELATIONSHIP_STATUS"] == "S") {
			echo "Single";
		} else {
			echo "Married";
		}
		?></td>
	</tr>
</table>

</div>
<br>
<a href="profilelist.php?user=<?php echo $req; ?>"><p>Click to See all profiles</p><br></a>
<div id="logout">
<form action="index.php" method="POST">
<input type="submit" value="Log Out!" id="logout"/><br>
</form>
</div>
</div>
</div>
</body>
<html>